﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XMLAnalyser.Source_Code
{
    interface IAnalyser
    {        
        /// <summary>
        /// Get the value of a node or attribute.
        /// </summary>
        /// <param name="xPath"></param>
        /// <returns></returns>
        string GetElementValue(string xPath);

        /// <summary>
        /// Get all of the nodes have the specify value.
        /// </summary>
        /// <param name="xPath"></param>
        /// <returns>Result, Exception nodes pairs, <Result, Exception> in varmap</returns>
        Dictionary<System.Xml.XmlNode, System.Xml.XmlNode> GetElements(string xPath);

        /// <summary>
        /// Get all of the nodes have the same xPath;
        /// </summary>
        /// <param name="xPath"></param>
        /// <returns></returns>
        // IList<System.Xml.XmlNode> GetElements(string xPath);

        /// <summary>
        /// Update the value of a node or attribute.
        /// </summary>
        /// <param name="xPath"></param>
        /// <param name="value">Return false if the element does not exist</param>
        bool UpdateElement(string xPath, string value);

        /// <summary>
        /// Delete a node or remove an attribute of a node.
        /// </summary>
        /// <param name="xPath"></param>
        /// <returns>eturn false if the element does not exist</returns>
        bool DeleteElement(string xPath);
    }
}
